class Operation(Shape):
    def _OccShape(self):
        op = self.args[0]
        if op == '+':
            self._occ_shape = BRepAlgoAPI_Fuse(self.args[1].OccShape(), self.args[2].OccShape()).Shape()
        elif op == '-':
            self._occ_shape = BRepAlgoAPI_Cut(self.args[1].OccShape(), self.args[2].OccShape()).Shape()
        elif op == '*':
            self._occ_shape = BRepAlgoAPI_Common(self.args[1].OccShape(), self.args[2].OccShape()).Shape()
        elif op == '(' or op == '<':
            print(*self.args)

            assert isinstance(self.args[1], Shape)
            assert isinstance(self.args[2], (list, tuple))

            self.args[1].Renew()

            if op == '<':
                fillet = BRepFilletAPI_MakeChamfer(self.args[1].occ_shape)

            else:
                fillet = BRepFilletAPI_MakeFillet(self.args[1].occ_shape)

            for i in self.args[2]:
                # print(self.args[1].occ_shape, self.args[3], self.args[1].edges[i])
                if len(self.args) == 5:
                    from OCC.Core.TopTools import (TopTools_IndexedDataMapOfShapeListOfShape,
                                                   TopTools_ListOfShape)
                    from OCC.Core.TopoDS import (topods_Vertex,  # downcasting functions
                                                 topods_Edge,
                                                 topods_Wire,
                                                 topods_Face,
                                                 topods_Shell,
                                                 topods_Compound,
                                                 topods_Solid)
                    from OCC.Core.TopoDS import topods_Vertex, topods_Edge

                    topo_explorer = TopologyExplorer(self.args[1].edges)

                    # for face in self.args[1].faces:
                    #     face.

                    edge_face_map = TopTools_IndexedDataMapOfShapeListOfShape()

                    topexp_MapShapesAndAncestors(self.args[1].occ_shape,
                                                 ta.TopAbs_EDGE,
                                                 ta.TopAbs_FACE,
                                                 edge_face_map)
                    face = topods_Face(edge_face_map.FindFromKey(topods_Edge(self.args[1].edges[i])).First())

                    fillet.AddDA(self.args[3],
                                 self.args[4],
                                 self.args[1].edges[i],
                                 face)
                else:
                    fillet.Add(self.args[3], self.args[1].edges[i])

            self._occ_shape = fillet.Shape()

        return self._occ_shape
